import {FormSchema} from '@/components/Form';


export const columns = [
  {
    title: '游戏ID',
    key: 'gameId',
    width: 200
  },
  {
    title: '游戏名称',
    key: 'gameName',
  },
  {
    title: "时间",
    key: "todayDate",
    width: 120
  },
  {
    title: '游戏下载地址',
    key: 'gameUrl',
  },
  {
    title: '在线时间',
    key: 'onlineTime',
    width: 200
  },
  {
    title: '推广人数',
    key: 'totalRegisterPeople',
  },
  {
    title: '总充值人数',
    key: 'totalRechargePeople',
  },
  {
    title: '今日注册人数',
    key: 'dayRegisterPeople',
  },
  {
    title: '活跃人数',
    key: 'dayActivePeople',
  },
  {
    title: '今日充值人数',
    key: 'dayRechargePeople',
  },
  {
    title: '今天充值金额',
    key: 'dayRechargeAmount',
  },
  {
    title: '总充值金额',
    key: 'totalRechargeMoney',
  },
  {
    title: '总付费率',
    key: 'totalPayRate',
  },
  {
    title: 'ARPU',
    key: 'arpu',
  },
  {
    title: 'ARPPU',
    key: 'arppu',
  },
  {
    title: "利润",
    key: 'profits',
    render: (row) => {
      return row.profits.toFixed(2)
    }
  }
];

export const fromSchema: FormSchema[] = [
  {
    field: 'gameKey',
    labelMessage: '游戏名称',
    label: '游戏名称',
    componentProps: {
      placeholder: '游戏名称',
    },
    rules: [{required: true, message: '游戏名称', trigger: ['blur']}],
    slot: "gameSelect"
  },
  {
    field: 'makeDate',
    label: '日期',
    defaultValue: null,
    componentProps: {
      clearable: true,
    },
    slot: "makeDate"
  },
];

